<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type='text/javascript' src="angular.js"></script>
</head>

<body ng-app='app'>
    <!-- n-click -->
    <input type="number" value="0" ng-model='value'>
    <input type="button" value="单击加一" onclick='alert("你触发了点击事件")' ng-click='value=value+1'>
    <!-- n-dblclick -->
    <input type="button" value="双击加5" onclick='alert("你触发了点击事件")' ng-click='value=value+5'>
    <br/>
    <div ng-controller='main'>
        {{msg}}
         <input type="text" ng-focus='f()' ng-blur='b()' ng-change='c()' ng-model='tet'><!--这里面的指令必须要和ng-model一起使用 -->
    </div> 
</body>
<script type="text/javascript">
    var app=angular.module('app',[]);
        app.controller('main',function($scope){
      $scope.msg='等待操作';
      $scope.f=function(){
          $scope.msg='文本框获取焦点';
      }
      $scope.b=function(){
          $scope.msg='文本框失去焦点';
      }
      $scope.c=function(){
          $scope.msg='文本框值被改变了';
      }
    })
</script>
</html>